-
Notifications
You must be signed in to change notification settings - Fork 95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: query bookmarks feedback changes #1295
Conversation
src/commands/index.ts
Outdated
} | ||
commands.registerCommand( | ||
"dbtPowerUser.createSqlFile", | ||
async ({ code, name }: { code?: string; name?: string }) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To open the code from bookmarks tab, added 2 arguments, code and fileName
src/commands/index.ts
Outdated
window.createTextEditorDecorationType({ | ||
rangeBehavior: DecorationRangeBehavior.OpenOpen, | ||
}); | ||
const fileNamePrefix = name || "poweruser"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no other change except this fileNamePrefix
editBuilder.replace(entireDocumentRange, "\n"); | ||
workspace.openTextDocument(uri).then((doc) => { | ||
// set this to sql language so we can bind codelens and other features | ||
languages.setTextDocumentLanguage(doc, "jinja-sql"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use jinja-sql language
: typeof self < "u" | ||
? self | ||
: {}; | ||
? window |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
most of the changes in this file are formatting changes and this is generated from altimate-components
if (document.uri.scheme !== "untitled" && document.languageId !== "sql") { | ||
if ( | ||
document.uri.scheme !== "untitled" && | ||
document.languageId !== "jinja-sql" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
converted the new query sql file from sql language to jinja-sql so we can use jinja autocompletes
} | ||
commands.registerCommand( | ||
"dbtPowerUser.createSqlFile", | ||
async ({ code, fileName }: { code?: string; fileName?: string }) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added these 2 arguments to display selected code from bookmark or history details and with filename
Overview
changes
jinja-sql
language instead ofsql
to have jinja/dbt auto completions as wellScreenshot/Demo
How to test
Checklist
README.md
updated and added information about my change